export const isList = (node) => node.type === 'list';
/**
 * Converts "- list" to "<ul><li>list</li></ul>"
 */
export const convertList = (node) => {
    node.type = 'mdxJsxFlowElement';
    node.name = node.ordered ? 'ol' : 'ul';
    const children = node.children.reduce((acc, listItem) => {
        acc.push({
            type: 'mdxJsxTextElement',
            name: 'li',
            attributes: [],
            children: listItem.children[0].children,
        });
        return acc;
    }, []);
    node.children = children;
};
